package com.bbm.communitysystem.domain.vo;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class PageVo<T> {

    private long total;

    private long size;

    private long current;

    private List<T> records;

    public PageVo() {

    }

    public PageVo(Page<?> page) {
        this.current = page.getCurrent();
        this.size = page.getSize();
        this.total = page.getTotal();

        this.records = new ArrayList<>();

    }

}
